//
//  IDCContentModel.m
//  GamePlan
//
//  Created by iD Student on 7/17/13.
//  Copyright (c) 2013 jasonkurtzman. All rights reserved.
//

#import "IDCContentModel.h"

@implementation IDCContentModel

-(IDCAllOthersViewController *) getVCforModule:(NSString *)module page:(int) pageIndex
{
    
    layersArray = [self.contents objectForKey:module];
    
    NSString *obj = [layersArray objectAtIndex:pageIndex];
    IDCAllOthersViewController *all = [[IDCAllOthersViewController alloc] init];
//    all.textView = [[UITextView alloc] initWithFrame: CGRectMake(0, 0, all.view.frame.size.width, all.view.frame.size.height)];
//    [all.textView setFont:[UIFont fontWithName:@"Arial" size:16]];
//    [all.textView setUserInteractionEnabled:NO];
//    [all.view addSubview: all.textView];
    
    all.index = pageIndex;
    all.webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, all.view.frame.size.width, all.view.frame.size.height)];
    //all.webView.frame = all.view.frame;
    [all.webView loadHTMLString:obj baseURL:nil];
    [all.view addSubview:all.webView];
    
    //all.textView.text = [obj stringByReplacingOccurrencesOfString:@"\\n" withString:@"\n\n"];
    
    return all;
}

-(int) getPageCountForModule:(NSString *)module
{
    int count = layersArray.count;
    return count;
}

@end
